package com.wangy.sct.common.core;

/**
 * ClassName: SctException <br/>
 * Description:  <br/>
 *
 * @author wangyue
 * @version V1.0.0
 * @date 2018/11/5 5:29 PM
 */
public class SctException extends Exception implements SctExceptionDescription {

	private String errCode;

	public SctException(Exception e) {
		super(e);
		this.errCode = SctEnum.UNKNOWEN_EXCEPTION.getErrCode();
	}

	public SctException(SctEnum sctEnum, Throwable throwable) {
		super(sctEnum.getMessage(), throwable);
		this.errCode = sctEnum.getErrCode();
	}

	public SctException(String errCode, String message, Throwable throwable) {
		super(message, throwable);
		this.errCode = errCode;
	}

	public String getErrCode() {
		return this.errCode;
	}
}
